﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="StudentInfoEdit.ascx.cs" 
    Inherits="ExaminationSys.View.SystemManage.StudentInfoEdit" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script type="text/javascript" language="javascript">
    var setID = function (param) {
        try {

            var hidden = document.getElementById('<%=StudentIDHidden.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
    var setLock = function (param) {
        try {
            var hidden = document.getElementById('<%=LockHidden.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
    var setPWD = function (param) {
        try {
            var hidden = document.getElementById('<%=PWDHidden.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
</script>

<input type="hidden" id="StudentIDHidden" runat="server" />
<input type="hidden" id="LockHidden" value="0" runat="server" />
<input type="hidden" id="PWDHidden" value="123456" runat="server" />
<ext:Window 
    ID="StudentInfoEditWindow" 
    runat="server"
    Icon="Group" 
    Title="用户管理(学生信息)编辑"
    Width="350" 
    Height="300" 
    AutoShow="false" 
    Modal="true" 
    Hidden="true"
    Layout="Fit">
    <Items>       
        <ext:FormPanel 
            ID="StudentInfoEditPanel" 
            runat="server" 
            Icon="ChartOrganisation"
            DefaultAnchor="95%"
            Padding="5"
            BodyPadding="10">
            <Items>
                <ext:TextField ID="UserID"  AllowBlank="false" runat="server" FieldLabel="学号" /> 
                <ext:TextField ID="LoginID" AllowBlank="false" runat="server" FieldLabel="登录名" />
                <ext:TextField ID="PWD" AllowBlank="false" runat="server" InputType="Password" FieldLabel="密码" />
                <ext:TextField ID="UserName" AllowBlank="false" runat="server" FieldLabel="学生姓名" />
                <ext:TextField ID="CollegeName" AllowBlank="false" runat="server" FieldLabel="学院" />
                <ext:TextField ID="MajorName" AllowBlank="false" runat="server" FieldLabel="专业" />
                <ext:TextField ID="ClassName" AllowBlank="false" runat="server" FieldLabel="班级" />
            </Items>
        </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="SaveButton" runat="server" Text="保存" Icon="BulletGo">
            <DirectEvents>
                <Click OnEvent="SaveStudentInfo" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                </Click>
            </DirectEvents>            
        </ext:Button>
        <ext:Button ID="CancelButton" runat="server" Text="取消" Icon="Cancel">
            <Listeners>
                 <Click Handler="#{StudentInfoEditWindow}.hide(null);" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>